﻿using System;
using System.Collections.Generic;
using T.FAS.Runtime.Base.Entity;


namespace T.FAS.Runtime.Base.SGSPI
{
    public interface ICodeItemService
    {
        /// <summary>
        /// 获取码表列表，filter为空查询全部码表，SetId不为空按照SetId过滤
        /// </summary>
        /// <returns></returns>
        List<CodeItem> GetCodeItems(Dictionary<string, string> filter);
        /// <summary>
        /// 查询码表ByID
        /// </summary>
        /// <param name="NM"></param>
        /// <returns></returns>
        CodeItem GetCodeItemByID(string NM);
        /// <summary>
        /// 保存码表
        /// </summary>
        /// <param name="codeItem"></param>
        void SaveCodeItem(CodeItem codeItem);
        /// <summary>
        /// 批量保存码表
        /// </summary>
        /// <param name="codeItems"></param>
        void SaveCodeItems(List<CodeItem> codeItems);
        /// <summary>
        /// 按主键删除码表
        /// </summary>
        /// <param name="NM"></param>
        void DeleteCodeItem(string NM);
        /// <summary>
        /// 按Setid删除码表
        /// </summary>
        /// <param name="SetId"></param>
        void DeleteCodeItemsBySetId(string SetId);
    }
}
